<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>回顾Object.defineProperty方法</title>
</head>
<body>
    <script>
        let number = 18
        let person = {
            name:'zhangsan',
            sex:'男',
        }
        Object.defineProperty(person, 'age',{
            value:18,
            enumerable: true,
            writable: true,
            configurable : true
            get:function{
                console.log("读取age属性");
                return number;
            }
        })
        console.log(Object.keys(person));
    </script>
</body>
</html>